<template>
  <el-config-provider :locale="language">
    <router-view />
  </el-config-provider>
</template>

<script setup>
import { ref, computed, watch, onBeforeMount } from "vue";
import { ElConfigProvider } from "element-plus";
import { useI18n } from "vue-i18n";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import en from "element-plus/dist/locale/en.mjs";
const { t, locale } = useI18n();
let language = computed(() => {
  return locale.value === "zh-CN" ? zhCn : en;
});
onBeforeMount(() => {
  document.title = t("page.systemName");
});
</script>
<style></style>
